home *** CD-ROM | disk | FTP | other *** search
- -- background: 3309 from stack: in
- -- bmap block id: 3042
- -- flags: 4000
- -- background id: 0
- -- name:
- ----- HyperTalk script -----
- on openCard
- get the number of lines of field 1
- add the number of lines of field 3 to it
- if it > 30 then
- answer "You have more than 30 items this month." with "Help" or "Delete Item"
- if it = "Delete Item" then
- send mouseUp to bkgnd button "Delete Item"
- else
- show field "ThirtyPlus"
- end if
- end if
- end openCard
-
- on closeCard
- hide field "ThirtyPlus"
- end closeCard
-
- on doMonth
- put the mouseloc into listHere
- put item 1 of listHere + 1 into horiz
- put item 2 of listHere - 10 into vert
- put card field "monthList" of card "Expenses" into theList
- get PopUpMenu(theList, 1, vert, horiz)
- put item it of theList into whatCard
- if it Γëá empty then
- visual barn door close slowly to gray
- visual barn door open slowly
- go card whatCard
- else
- exit doMonth
- end if
- end doMonth
-
-
-
- -- part 29 (field)
- -- low flags: 01
- -- high flags: 4002
- -- rect: left=20 top=56 right=297 bottom=181
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: expense
- ----- HyperTalk script -----
- on mouseDown
- seeItems
- end mouseDown
-
-
-
- -- part 30 (field)
- -- low flags: 01
- -- high flags: 4002
- -- rect: left=180 top=56 right=297 bottom=256
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: amount
-
-
- -- part 59 (field)
- -- low flags: 01
- -- high flags: 4002
- -- rect: left=256 top=56 right=297 bottom=417
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: expense2
- ----- HyperTalk script -----
- on mouseDown
- seeItems
- end mouseDown
-
-
- -- part 60 (field)
- -- low flags: 01
- -- high flags: 4002
- -- rect: left=416 top=56 right=297 bottom=492
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: amount2
-
-
- -- part 61 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=55 top=18 right=37 bottom=148
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: monthName
- ----- HyperTalk script -----
- on mouseDown
- doMonth
- end mouseDown
-
-
-
- -- part 64 (button)
- -- low flags: 00
- -- high flags: A002
- -- rect: left=280 top=18 right=37 bottom=370
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Delete Item
- ----- HyperTalk script -----
- --Copyright ©1988 - Scott McGilliard - all rights reserved
-
- on mouseUp
- if the optionKey is down then
- answer "Delete all the expense items?" with "Cancel" or "OK"
- if it = "OK" then
- push this card
- set lockScreen to true
- put line 3 of card field "startMonth" of card "Year Totals" into adjust
- repeat with i = 2 to the number of items in adjust
- get item i of adjust
- go card it
- if the result = empty then doMenu "Delete Card"
- end repeat
- pop card
- put empty into card field "allExpenses" of card "whichMonths"
- put empty into card field "startMonth" of card "Year Totals"
- noMore
- put "This will take a couple of minutes, please wait."
- repeat with i = 1 to 2
- put empty into card field i of card "printList"
- end repeat
- repeat with i = 1 to 9
- put empty into card field i of card "printTotals"
- end repeat
- repeat with i = 1 to 6
- put empty into card field i of card "printMonths2"
- end repeat
- repeat with i = 1 to 6
- put empty into card field i of card "printMonths"
- end repeat
- doMath
- else
- exit mouseUp
- end if
- else
- set loc of msg to 18,15
- put "Please click on the expense item you want deleted"
- set cursor to 3
- repeat until the mouse is down
- end repeat
- put item 1 of the mouseLoc into temp1
- put item 2 of the mouseLoc into temp2
- if temp1 > 181 and temp1 < 256 then
- hide msg
- exit mouseUp
- end if
- if temp1 < 20 or temp1 >417 then
- hide msg
- exit mouseUp
- end if
- if temp1 >= 20 and temp1 <= 181 then
- put "expense" into whichField
- else
- if temp1 >= 256 and temp1 <= 417 then
- put "expense2" into whichField
- end if
- end if
- put card field "allExpenses" of card "whichMonths" into allExpenses
- put (temp2 - 39) div 16 into whichLine
- put line whichLine of field whichField into whatExpense
- if whatExpense Γëá empty then
- answer "Delete expense item..." && whatExpense &&"?" with "Cancel" or "OK"
- if it = "Cancel" then put empty into whatExpense
- end if
- if whatExpense = empty then
- hide msg
- exit mouseUp
- end if
- set cursor to 4
- set loc of msg to 19,106
- put "Please wait"
- repeat with i = 1 to the number of lines in allExpenses
- if whatExpense = item 1 of line i of allExpenses then
- delete line i of card field "allExpenses" of card "whichMonths"
- exit repeat
- end if
- end repeat
- if whatExpense is in line 3 of card field "startMonth" of card "Year Totals" then
- push this card
- set lockScreen to true
- put line 3 of card field "startMonth" of card "Year Totals" into adjust
- repeat with i = 2 to the number of items in adjust
- if whatExpense = item i of adjust then delete item i of line 3 of card field "startMonth" of card "Year Totals"
- exit repeat
- end repeat
- go card whatExpense
- if the result = empty then doMenu "Delete Card"
- pop card
- end if
- repeat with y = 1 to 3
- if whatExpense is in field y of card "Expenses" then
- repeat with i = 1 to the number of lines in field y of card "Expenses"
- if whatExpense = line i of field y of card "Expenses" then
- delete line i of field y of card "Expenses"
- exit repeat
- end if
- end repeat
- exit repeat
- end if
- end repeat
- get line 16 of field 1 of card "Expenses"
- if it = empty then
- put line 1 of field 2 of card "Expenses" into line 16 of field 1 of card "Expenses"
- delete line 1 of field 2 of card "Expenses"
- end if
- get line 16 of field 2 of card "Expenses"
- if it = empty then
- put line 1 of field 3 of card "Expenses" into line 16 of field 2 of card "Expenses"
- delete line 1 of field 3 of card "Expenses"
- end if
- repeat with i = 1 to 3
- get field i of card "Expenses"
- if it Γëá empty then
- repeat
-
- get field i of card "Expenses"
- if it = empty then exit repeat
-
- get the number of lines of field i of card "Expenses"
- put it into temp
- get line temp of field i of card "Expenses"
- if it = empty then
- delete line temp of field i of card "Expenses"
- else
- exit repeat
- end if
- end repeat
- end if
- end repeat
- repeat with x = 2 to 13
- repeat with y = 1 to 4
- if whatExpense is in field y of card x then
- repeat with i = 1 to the number of lines in field y of card x
- if whatExpense = line i of field y of card x then
- delete line i of field y of card x
- delete line i of field (y + 1) of card x
- exit repeat
- end if
- end repeat
- exit repeat
- end if
- end repeat
- get line 15 of field 1 of card x
- if it = empty then
- put line 1 of field 3 of card x into line 15 of field 1 of card x
- put line 1 of field 4 of card x into line 15 of field 2 of card x
- delete line 1 of field 3 of card x
- delete line 1 of field 4 of card x
- end if
- end repeat
- hide msg
- end if
- end mouseUp
-
-
-
- -- part 65 (button)
- -- low flags: 00
- -- high flags: A002
- -- rect: left=195 top=18 right=37 bottom=280
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Enter Item
- ----- HyperTalk script -----
- on mouseUp
- global moreExpenses
- put 1 into moreExpenses
- end mouseUp
-
-
-
- -- part 66 (button)
- -- low flags: 00
- -- high flags: A002
- -- rect: left=94 top=313 right=332 bottom=175
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Year Totals
- ----- HyperTalk script -----
- on mouseUp
- visual barn door close slowly to gray
- visual barn door open slowly
- go card "Year Totals"
- end mouseUp
-
-
-
- -- part 67 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=1 top=5 right=45 bottom=40
- -- title width / last selected line: 0
- -- icon id / first selected line: 11030 / 11030
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual barn door close slowly to gray
- visual dissolve
- go stack "Home"
- end mouseUp
-
-
-
- -- part 68 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=255 top=307 right=339 bottom=292
- -- title width / last selected line: 0
- -- icon id / first selected line: 20087 / 20087
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: NextCard
- ----- HyperTalk script -----
- on mouseUp
- visual barn door close slowly to gray
- visual barn door open slowly
- go next card
- end mouseUp
-
-
-
- -- part 69 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=219 top=307 right=339 bottom=256
- -- title width / last selected line: 0
- -- icon id / first selected line: 20086 / 20086
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: PreviousCard
- ----- HyperTalk script -----
- on mouseUp
- visual barn door close slowly to gray
- visual barn door open slowly
- go previous card
- end mouseUp
-
-
-
- -- part 70 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=462 top=307 right=339 bottom=499
- -- title width / last selected line: 0
- -- icon id / first selected line: 16816 / 16816
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: PopCard
- ----- HyperTalk script -----
- on mouseUp
- visual barn door close slowly to gray
- visual barn door open slowly
- pop card
- end mouseUp
-
-
-
- -- part 71 (field)
- -- low flags: 01
- -- high flags: 0002
- -- rect: left=365 top=314 right=332 bottom=441
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 65535
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: subTotal
-
-
- -- part 74 (button)
- -- low flags: 00
- -- high flags: A002
- -- rect: left=370 top=18 right=37 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Change Amount
- ----- HyperTalk script -----
- --Copyright ©1988 - Scott McGilliard - all rights reserved
-
- on mouseUp
- set loc of msg to 18,15
- put "Please click on the expense amount you want changed"
- set cursor to 3
- set numberFormat to "0.00"
- repeat until the mouse is down
- end repeat
- hide msg
- put item 1 of the mouseLoc into temp1
- put item 2 of the mouseLoc into temp2
- if temp1 >= 180 and temp1 <= 256 then
- put "expense" into whichField
- put "amount" into whichField2
- else
- if temp1 >= 416 and temp1 <= 492 then
- put "expense2" into whichField
- put "amount2" into whichField2
- else
- hide msg
- exit mouseUp
- end if
- end if
- put card field "allExpenses" of card "whichMonths" into allExpenses
- put (temp2 - 39) div 16 into whichLine
- put line whichLine of field whichField into whatExpense
- put line whichLine of field whichField2 into newAmount
- if whatExpense = empty then
- hide msg
- exit mouseUp
- end if
- ask "Please enter new amount for" && whatExpense with newAmount
- if it = empty then
- hide msg
- exit mouseUp
- else
- if char 1 of it = "$" then delete char 1 of it
- add 0 to it
- put "$" & it into newAmount
- if it = newAmount then
- hide msg
- exit mouseUp
- end if
- end if
- set cursor to 4
- set loc of msg to 19,106
- put "Please wait"
- get the short name of card
- put it into monthName
- repeat with i = 1 to the number of lines in allExpenses
- if whatExpense = item 1 of line i of allExpenses then
- put line i of card field "allExpenses" of card "whichMonths" into expenseInfo
- else
- next repeat
- end if
- if item 2 of expenseInfo = "variable" then
- if whatExpense is in line 3 of card field "startMonth" of card "Year Totals" then
- repeat with z = 1 to 12
- if monthName = line z of field "months" of card whatExpense then exit repeat
- end repeat
- if item 2 of expenseInfo = "variable" then put newAmount into line z of field "actual" of card whatExpense
- end if
- repeat with z = 3 to the number of items in expenseInfo
- if word 1 of item z of expenseInfo = monthName then
- put newAmount into last word of item z of line i of card field "allExpenses" of card "whichMonths"
- put newAmount into line whichLine of field whichField2
- hide msg
- exit mouseUp
- end if
- end repeat
- else
- put newAmount into item 2 of line i of card field "allExpenses" of card "whichMonths"
- if whatExpense is in line 3 of card field "startMonth" of card "Year Totals" then
- repeat with t = 1 to 12
- if it = line t of field "months" of card whatExpense then exit repeat
- end repeat
- repeat with t = t to 12
- get line t of field "amount" of card whatExpense
- if it Γëá empty then put newAmount into line t of field "actual" of card whatExpense
- put line t of field "months" of card whatExpense into x
- repeat with y = 1 to 3
- if whatExpense is in field y of card x then
- repeat with i = 1 to the number of lines in field y of card x
- if whatExpense = line i of field y of card x then
- put newAmount into line i of field (y + 1) of card x
- exit repeat
- end if
- end repeat
- exit repeat
- end if
- end repeat
- end repeat
- else
- if item 3 of expenseInfo = "Every Month" then
- repeat with x = 2 to 13
- repeat with y = 1 to 3
- if whatExpense is in field y of card x then
- repeat with i = 1 to the number of lines in field y of card x
- if whatExpense = line i of field y of card x then
- put newAmount into line i of field (y + 1) of card x
- exit repeat
- end if
- end repeat
- exit repeat
- end if
- end repeat
- end repeat
- else
- repeat with z = 3 to the number of items in expenseInfo
- put item z of expenseInfo into x
- repeat with y = 1 to 3
- if whatExpense is in field y of card x then
- repeat with i = 1 to the number of lines in field y of card x
- if whatExpense = line i of field y of card x then
- put newAmount into line i of field (y + 1) of card x
- exit repeat
- end if
- end repeat
- exit repeat
- end if
- end repeat
- end repeat
- end if
- end if
- end if
- end repeat
- hide msg
- end mouseUp
-
-
-
- -- part 75 (button)
- -- low flags: 00
- -- high flags: 2000
- -- rect: left=28 top=305 right=341 bottom=66
- -- title width / last selected line: 0
- -- icon id / first selected line: 26104 / 26104
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: HelpIndex
- ----- HyperTalk script -----
- on mouseUp
- push card
- helpIndex
- end mouseUp
-
-
-
- -- part 76 (field)
- -- low flags: 81
- -- high flags: 2004
- -- rect: left=96 top=43 right=167 bottom=426
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: ThirtyPlus
- ----- HyperTalk script -----
- on mouseUp
- hide field "ThirtyPlus"
- end mouseUp
-
-